In [ ]:
print("Hello, this is a word counting program, so it is able to count the words in your writing.")

while True:
    def counting(writing):
        words = writing.split()
        return len(words)

    writing = input("Enter your writing: ")

    words_num = counting(writing)

    print(f"The Word count is: {words_num}")

    print("")    
    goAgain = input("Do you want to count your writing again? (Yes or No): ") 
    if goAgain == "No" or goAgain == "no": 
        print("Have a Good Day!!") 
        break
    
Hello, this is a word counting program, so it is able to count the words in your writing.
In [ ]:
 
In [ ]: